<?

  $dir = pathinfo($_SERVER['SCRIPT_FILENAME']); 

  if (ini_set("include_path",ini_get("include_path").((strtoupper(PHP_OS) == "LINUX") ? ":" : ";").$dir['dirname']) === false) {
	  echo "ERROR: Definicion en el include_path";
	  exit;
  }

  include('../adodb/adodb.inc.php');
  include_once('../adodb/adodb-pager.inc.php');
  include_once('../conf/dbconn_param.php');
    
  $db = ADONewConnection($dbdriver);
  $db->Connect($server, $user, $password, $database);
  $db->SetFetchMode(ADODB_FETCH_ASSOC);

  $db->debug = false;
  
  $record['descripcion'] = $_REQUEST['descripcion'] ;
  $record['tema'] = $_REQUEST['tema'] ;
  $record['subtema'] = $_REQUEST['subtema'] ;
  $record['valor'] = $_REQUEST['valor'] ;
  $record['plazo'] = $_REQUEST['plazo'] ;
  
  $rs = $db->Execute("select * from indicadores where 1 = -1");
  $sql = $db->GetInsertSQL($rs, $record);
  $db->Execute($sql);
  $rs = $db->Execute("select MAX(pk_indicador) as id from indicadores ");
  $datos = $rs->GetRows();
  $id = $datos[0]['id'];
  
  
  ob_start();
  print_r($_REQUEST);
  $salida1 = ob_get_contents();
  ob_end_clean();
  
   
  $f = fopen("inserting.txt", "w");
  fwrite($f, "$salida1");
  fclose($f);
  
  
  $db->Close();
  //echo $id ;
  echo "";
?>